﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using WooCoo.DataPortal.Server.Hosts.WcfChannel;

namespace WooCoo.DataPortal.Server.Hosts
{
    /// <summary>
    /// WCF门户接口契约
    /// </summary>
    [ServiceContract]
    public interface IWcfPortal
    {
        /// <summary>
        /// 创建业务对象.
        /// </summary>
        /// <param name="request">条件参数.</param>
        [OperationContract]
        [UseNetDataContract]
        //[WebInvoke
        WcfResponse Create(CriteriaRequest request);
        /// <summary>
        /// 获取业务对象.
        /// </summary>
        /// <param name="request">条件参数.</param>
        [OperationContract]
        [UseNetDataContract]
        WcfResponse Fetch(CriteriaRequest request);
        /// <summary>
        /// 更新业务对象.
        /// </summary>
        /// <param name="request">需要更新的业务实体.</param>
        [OperationContract]
        [UseNetDataContract]
        WcfResponse Update(UpdateRequest request);
        /// <summary>
        /// 删除业务对象.
        /// </summary>
        /// <param name="request">条件参数.</param>
        [OperationContract]
        [UseNetDataContract]
        WcfResponse Delete(CriteriaRequest request);
        /// <summary>
        /// 执行业务命令
        /// </summary>
        /// <param name="request">包含命令信息的参数</param>
        /// <returns></returns>
        [OperationContract]
        [UseNetDataContract]
        WcfResponse Execute(ExcuteRequest request);
    }
}
